package com.wyyc.entity;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by Hwei~ on 2017/6/7.
 */
@Entity
@Table(name = "car_illegal_record", schema = "", catalog = "db_wycar")
public class CarIllegalRecordEntity {
    private int id;
    private Integer carId;
    private Integer userId;
    private String money;
    private String fen;
    private Date addate;
    private Timestamp createTime;
    private Date fineDate;
    private Timestamp fineTime;
    private String area;
    private String code;
    private String act;
    private String handled;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "carId")
    public Integer getCarId() {
        return carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }

    @Basic
    @Column(name = "userId")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "money")
    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    @Basic
    @Column(name = "fen")
    public String getFen() {
        return fen;
    }

    public void setFen(String fen) {
        this.fen = fen;
    }

    @Basic
    @Column(name = "addate")
    public Date getAddate() {
        return addate;
    }

    public void setAddate(Date addate) {
        this.addate = addate;
    }

    @Basic
    @Column(name = "createTime")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "fineDate")
    public Date getFineDate() {
        return fineDate;
    }

    public void setFineDate(Date fineDate) {
        this.fineDate = fineDate;
    }

    @Basic
    @Column(name = "fineTime")
    public Timestamp getFineTime() {
        return fineTime;
    }

    public void setFineTime(Timestamp fineTime) {
        this.fineTime = fineTime;
    }

    @Basic
    @Column(name = "area")
    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "act")
    public String getAct() {
        return act;
    }

    public void setAct(String act) {
        this.act = act;
    }

    @Basic
    @Column(name = "handled")
    public String getHandled() {
        return handled;
    }

    public void setHandled(String handled) {
        this.handled = handled;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CarIllegalRecordEntity that = (CarIllegalRecordEntity) o;

        if (id != that.id) return false;
        if (act != null ? !act.equals(that.act) : that.act != null) return false;
        if (addate != null ? !addate.equals(that.addate) : that.addate != null) return false;
        if (area != null ? !area.equals(that.area) : that.area != null) return false;
        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (fen != null ? !fen.equals(that.fen) : that.fen != null) return false;
        if (fineDate != null ? !fineDate.equals(that.fineDate) : that.fineDate != null) return false;
        if (fineTime != null ? !fineTime.equals(that.fineTime) : that.fineTime != null) return false;
        if (handled != null ? !handled.equals(that.handled) : that.handled != null) return false;
        if (money != null ? !money.equals(that.money) : that.money != null) return false;
        if (userId != null ? !userId.equals(that.userId) : that.userId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (carId != null ? carId.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (fen != null ? fen.hashCode() : 0);
        result = 31 * result + (addate != null ? addate.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (fineDate != null ? fineDate.hashCode() : 0);
        result = 31 * result + (fineTime != null ? fineTime.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (act != null ? act.hashCode() : 0);
        result = 31 * result + (handled != null ? handled.hashCode() : 0);
        return result;
    }
}
